//
//  Globals.h
//  Shengzhuli
//
//  Created by 卡忙科技 on 16/7/18.
//  Copyright © 2016年 kamangkeji. All rights reserved.
//

#ifndef Globals_h
#define Globals_h
#import "UIView+Extension.h"
#import "UIColor+Extension.h"

#define ScreenW [[UIScreen mainScreen] bounds].size.width
#define ScreenH [[UIScreen mainScreen] bounds].size.height
#define Scale ScreenH/1334
#define SafeAreaBottomHeight (ScreenH == 812.0 ? 34 : 0)
#define SafeAreaTopHeight (ScreenH == 812.0 ? 88 : 64)
#define SafeAreaTopInset (ScreenH == 812.0 ? 44 : 0)
#define NaviViewHight (ScreenH == 812.0 ? 54 : 44)

#define IS_IPHONE (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
#define IS_IPHONE_5 (IS_IPHONE && ScreenH == 568.00)
#define IS_IPHONE_6 (IS_IPHONE && ScreenH == 667.00)
#define IS_IPHONE_6P (IS_IPHONE && ScreenH == 736.00)
#define IS_IPHONE_X (IS_IPHONE && ScreenH == 812.00)

#define RGBColor(x, y, z)  [UIColor colorWithRed:x/255.0 green:y/255.0 blue:z/255.0 alpha:1.0]
#define RGBColorA(r, g, b, a) ([UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a])
#define RGBColorOne(x)  [UIColor colorWithRed:x/255.0 green:x/255.0 blue:x/255.0 alpha:1.0]
#define RandomColor RGBColor(arc4random_uniform(250), arc4random_uniform(250), arc4random_uniform(250))
#define WineColor [UIColor redColor]
#define NavTinColor RGBColor(59, 58, 63)
#define DefaultBlueColor [UIColor colorWithHexString:@"#3285ff"]


#define Font(x) [UIFont systemFontOfSize:x]
#define FontB(x) [UIFont boldSystemFontOfSize:x]
#define GetImage(imageName)  [UIImage imageNamed:imageName]
/**
 *  2.返回一个RGBA格式的UIColor对象
 */
#define RGBA(r, g, b, a) [UIColor colorWithRed:r/255.0f green:g/255.0f blue:b/255.0f alpha:a]

#define SwitchRooter @"SwitchRooter"//切换rootVc

#define APPVersion @"01"
//#define PublicServer @"http://192.168.10.131:8083/Aiyg/"
#define PublicServer @"http://47.93.184.121:8081/"


#define UserLogined @"UserLogined"//用户登录
#define User_Json @"User_Json"//登录状态
#define EaseAgreeAddFriends @"EaseAgreeAddFriends"//环信同意加好友
#define ModifyUserInfoUpdate @"ModifyUserInfoUpdate"//环信同意加好友

//个人中心更新角标通知
#define KPersongbadgeUpdate @"ModifyUserInfoUpdate"

//购物车相关
#define BuyCarGoodsCount @"BuyCarGoodsCount"
#define BuyCarAddNotifation @"BuyCarAddNotifation"
#define KAddCoverNotification @"KAddCoverNotification"//点击加号通知
#define NoNetworkStatus @"网络连接断开,请检查网络!"
#define NetworkError @"网络异常,请检查网络!"
/**
 推送跳转
 */
#define KPushNotification @"KPushNotification"

#define __WEAK __weak typeof(self) weakSelf = self;
/**
 商品类型
 */
typedef enum {
    GoodsTypeNormal = 1,
    GoodsTypeFreeWine,
    GoodsTypeFutures
}GoodsType;
/**
 导航方案
 */
typedef NS_ENUM(NSInteger, AMapRoutePlanningType)
{
    AMapRoutePlanningTypeDrive = 0,
    AMapRoutePlanningTypeBus,
    AMapRoutePlanningTypeWalk
};

#define SuccessStatus @"00000000"//请求成功状态
#define FirstBuyStatus @"00000048"//第一次购买商品
#define NoLoginStatus @"00000014"//未登陆code
#define NoLoginError @"用戶尚未登录"


#define UserLogined @"UserLogined"//用户登录

#define CityList @"CityList"//城市列表
#define WeixinSecret @"1b2n3v4fx5v56vj8f3hd5t7g5f6hj8fh"//微信商户秘钥
#endif /* Globals_h */
